package com.anxin.act.file.service;

import com.anxin.act.busFlow.entity.WfBusNode;
import com.anxin.act.busFlow.entity.WfConfigNode;
import com.anxin.act.busFlow.service.WfBusNodeService;
import com.anxin.act.busFlow.service.WfConfigNodeService;
import com.anxin.act.file.dao.WfFileDao;
import com.anxin.act.file.dto.WfFileDTO;
import com.anxin.act.file.vo.WfFileVO;
import com.anxin.framework.web.entity.AjaxResult;
import com.anxin.framework.web.service.BaseService;
import com.anxin.sys.file.dao.FileBaseDao;
import com.anxin.sys.file.entity.FileBase;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 流程附件
 *
 * @author jbs
 * @date 2020-03-26
 */
@Service
public class WfFileService extends BaseService<FileBaseDao, FileBase>{

    @Autowired
    private WfFileDao wfFileDao;

    /**
     * 查询流程文档
     * @return
     */
    public AjaxResult findWfFile(WfFileDTO wfFileDTO){
        WfBusNode wfBusNode = new WfBusNode();
        wfBusNode.setBusId(wfFileDTO.getBusId());

        List<WfFileVO> wfFileVOList = wfFileDao.findWfFile(wfFileDTO.getBusId());

        return AjaxResult.success(wfFileVOList);
    }

}
